package com.zoshine.zzg.pojo.pojostatus;

import java.util.Objects;

/**
 * 犯人点单状态枚举
 *
 * @author 贾俊峰
 * @time 2017/6/20 17:42
 */
public enum OrderStatus {
    PENDINGAUDIR(1, "待审核"),
    AUTIDED(2, "审核通过"),
    PENDINGDELIVERING(3, "待配送"),
    INDELIVERING(4, "配送中"),
    PART_FINISH(5,"部分完成"),
    FINISHED(9, "全部完成"),
    SETTLEMENT(10,"已收货"),
    FAIL(99, "审核失败");

    private int value;
    private String desc;
    OrderStatus(final int value, final String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public static String getDesc(Integer value) {
        for (OrderStatus menuStatus : OrderStatus.values()) {
            if (Objects.equals(menuStatus.value, value)) {
                return menuStatus.desc;
            }
        }
        return null;
    }
}
